@echo off
net file 1>NUL 2>NUL || start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c pushd ""%~dp0"" && ""%~s0"" %*","","runas",0)(window.close) && exit

chcp 65001 >nul
IF "%1"=="" (
    echo 请输入打包环境 正式环境prod 测试环境test
    exit
)
SET "environment=%1"
IF "%2"=="" (
    echo 请输入版本号 如 1.2.3
    exit
)
SET "version=%2"
IF "%environment%"=="prod" (
  call yarn build:prod
) ELSE (
  call yarn build:test
)
@REM 打包本地镜像
docker build --platform=linux/amd64 -t tqlnuxt:%version% .

@REM 推送到远程仓库
docker push tqlnuxt:%version%